home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Way Cool Games 2
/
Quantum Axcess Way Cool Games Too.iso
/
games
/
yalife
/
source
/
winerror.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1993-09-07
|
548b
|
21 lines
// (c) Jean MICHEL June 1993 -- any modifications must be signaled to the
// author
#include <stdio.h>
#include <owl.h>
#include <stdarg.h>
#include "efns.h"
#include "winerror.h"
void error(int errorcode,char *fmt,...)
{ char buf[200],*s,*errorstring;
if(errorcode&WARNING_)errorstring="WARNING";
va_list argptr;
va_start(argptr,fmt);
s=buf+vsprintf(buf,fmt,argptr);
va_end(argptr);
if(errorcode&FILE_)sprintf(s," : %s",strerror(errno));
MessageBeep(-1);
MessageBox(NULL,buf,errorstring,MB_OK|MB_ICONSTOP);
}